import 'package:flutter/material.dart';

class MyAlertDialog0 extends StatefulWidget {
  final String content;

  // 传递 content
  const MyAlertDialog0({super.key, required this.content});

  @override
  State<StatefulWidget> createState() => _MyAlertDialogState();
}

class _MyAlertDialogState extends State<MyAlertDialog0> {
  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      title: Text('注意'),
      content: Text(widget.content),
      actions: [
        TextButton(
            onPressed: () {
              Navigator.pop(context);
            },
            child: Text('确定'))
      ],
    );
  }
}
